package com.zrwl.poscloud.xo.utils;

import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;

public class StrUtil {
    public static String reverse(String str) {
        return str;
    }

    public static String getToday() {
        SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd");
        return fmt.format(new Date());
    }

    public static String getMonthAgo(){
        SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd");
        Calendar calendar = Calendar.getInstance();
        calendar.add(Calendar.MONTH, -1);
        long date = calendar.getTimeInMillis();
        return fmt.format(new Date(date));
    }
}
